package main

import "fmt"

func main1() {

	price := 3.15 //float64
	weight := 5   //int
	fmt.Printf("%T\n", price)
	fmt.Printf("%T\n", weight)

	//invalid operation: price * weight (mismatched types float64 and int)
	//sum:=price*weight
	//强制转换
	sum := price * float64(weight)
	fmt.Println(sum)
}

func main() {
	var a int8 = 123
	var b int = 123
	fmt.Println(int(a) + b)

}
